Removed g_object_pointer_hash, which was just g_direct_hash.
authorOwen Taylor <otaylor@gtk.org>
Tue, 9 Jun 1998 23:18:11 +0000 (23:18 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 9 Jun 1998 23:18:11 +0000 (23:18 +0000)
Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>

* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.

Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>

* configure.in: x_libs=, not $x_libs=. Enough said.
          (Case only hit for --disable-xshm)

Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>

* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
  when testing for X libraries, don't replace them. Because
  the user might have specified the path to the X libraries
  themself before running configure.

* examples/**.c: Changed all gpointer * to gpointer

Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>

* configure.in (LDFLAGS): Bomb out with a moderately
  helpful message if detection of X libraries fails.

Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>

  [ Combination of:
     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]

* gdk/gdk.h gdk/gdkcc.c gdk/gdkfont.c gtk/gtkmain.c
  gtk/gtksignal.c gtk/gtktext.c:

  Fixups for warnings from adding const to type of GHashFunc,
  GCompareFunc

* gtk/gtkcombo.c (gtk_combo_entry_key_press): Minor style/
  ansi-warnings fixups.

Tue Jun  9 17:47:33 1998  Owen Taylor  <otaylor@gtk.org>

* glib.h: Remove #error - HP/UX.

Sat May 23 19:00:01 1998  Owen Taylor  <otaylor@gtk.org>
  [ Combination of:
     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]

* glib.h ghash.c gstring.c gdataset.c gutils.c:
- Added new typedef g_const_pointer; expunged all incorrect
  uses of 'const gpointer'.
- Fixed up warnings that that created,
- Changed GHashFunc and GCompareFunc to take g_const_pointer
  arguments. (Necessary, but will cause warnings in existing
  code until fixed)
- Added other new const in harmless positions.

40 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
configure.in
examples/buttons/buttons.c
examples/filesel/filesel.c
examples/helloworld2/helloworld2.c
examples/notebook/notebook.c
examples/packbox/packbox.c
examples/pixmap/pixmap.c
examples/progressbar/progressbar.c
examples/radiobuttons/radiobuttons.c
examples/rulers/rulers.c
examples/scrolledwin/scrolledwin.c
examples/statusbar/statusbar.c
examples/table/table.c
examples/wheelbarrow/wheelbarrow.c
gdk/gdk.h
gdk/gdkcc.c
gdk/gdkfont.c
gdk/x11/gdkcc-x11.c
gdk/x11/gdkfont-x11.c
glib/ChangeLog
glib/gdataset.c
glib/ghash.c
glib/glib.h
glib/gscanner.c
glib/gstring.c
glib/gutils.c
glib/testglib.c
gtk/gtkaccelgroup.c
gtk/gtkcombo.c
gtk/gtkmain.c
gtk/gtkobject.c
gtk/gtksignal.c
gtk/gtktext.c

index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 595012e63e76c7118b0b1acfac78544f94ae12f0..0a90f2e8b4b96815ef2c1819897747f5654ff9ae 100644 (file)
@@ -1,3 +1,22 @@
+Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * gtk/gtkobject.c: Removed g_object_pointer_hash, which
+       was just g_direct_hash.
+
+Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in: x_libs=, not $x_libs=. Enough said.
+          (Case only hit for --disable-xshm)
+       
+Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
+         when testing for X libraries, don't replace them. Because
+         the user might have specified the path to the X libraries
+         themself before running configure.
+
+       * examples/**.c: Changed all gpointer * to gpointer
+       
 1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
 
 Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>
 
-       * configure.in (LDFLAGS): Bombo out with a moderately
+       * configure.in (LDFLAGS): Bomb out with a moderately
          helpful message if detection of X libraries fails.
 
 Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>
index 5311d000898c96df46b13ea236cb87c6538a0edf..9aa45647f16ec30206e507cdeaa394f43facb1e8 100644 (file)
@@ -140,8 +140,8 @@ fi
 saved_cflags="$CFLAGS"
 saved_ldflags="$LDFLAGS"
 
-CFLAGS="$X_CFLAGS"
-LDFLAGS="$X_LDFLAGS $X_LIBS"
+CFLAGS="$CFLAGS $X_CFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
 
 if test "x$no_x" = "xyes"; then 
   AC_MSG_ERROR([
@@ -170,7 +170,7 @@ fi
 
 AC_CHECK_LIB(Xext, XShapeCombineMask,
       if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
-           $x_libs="-lXext $x_libs"
+           x_libs="-lXext $x_libs"
       fi
       AC_DEFINE(HAVE_SHAPE_EXT),
       ,
index fae4085fca1a8f4e7ee86068b3714a12ffa520e9..fecfc4683ba95877cd6c7ef9589ff86a700db8fe 100644 (file)
@@ -46,7 +46,7 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
 }
 
 /* our usual callback function */
-void callback (GtkWidget *widget, gpointer *data)
+void callback (GtkWidget *widget, gpointer data)
 {
     g_print ("Hello again - %s was pressed\n", (char *) data);
 }
index 5a19392b00ece3d52abcc12c8efbc81e8f51f99b..c5afd88990f7fb3876589157367e883579cc61d8 100644 (file)
@@ -10,7 +10,7 @@ void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
     g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
 }
 
-void destroy (GtkWidget *widget, gpointer *data)
+void destroy (GtkWidget *widget, gpointer data)
 {
     gtk_main_quit ();
 }
index 4f6d692e94aba6e869194e30bf9bfb65b290f35c..6b945d66c09c46fbef15e11099653541f8bf58fe 100644 (file)
@@ -6,13 +6,13 @@
    
 /* Our new improved callback.  The data passed to this function is printed
  * to stdout. */
-void callback (GtkWidget *widget, gpointer *data)
+void callback (GtkWidget *widget, gpointer data)
 {  
     g_print ("Hello again - %s was pressed\n", (char *) data);
 }
      
 /* another callback */
-void delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
+void delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
 {    
     gtk_main_quit ();
 }
index fdbc9383e815f4e3ec420ece725eb216f50d670c..781990dac3c1e9807b8978888e538772a9a2664a 100644 (file)
@@ -36,7 +36,7 @@ void remove_book (GtkButton *button, GtkNotebook *notebook)
     gtk_widget_draw(GTK_WIDGET(notebook), NULL);
 }
 
-void delete (GtkWidget *widget, GdkEvent *event, gpointer *data)
+void delete (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
     gtk_main_quit ();
 }
index 726eae55f24d644449260d60abf9ce029787cd5d..865fafbca0b638e2023cdf2b7b8579b9040e5b37 100644 (file)
@@ -5,7 +5,7 @@
 #include "gtk/gtk.h"
 
 void
-delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
+delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
     gtk_main_quit ();
 }
index 21e2d47fc62ca1be985ad2dd592dbbfa2e854148..48f1d4410cfde7f1d8e55965ec771a9d9a19d055 100644 (file)
@@ -31,14 +31,15 @@ static const char * xpm_data[] = {
 
 /* when invoked (via signal delete_event), terminates the application.
  */
-void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
+void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) 
+{
     gtk_main_quit();
 }
 
 
 /* is invoked when the button is clicked.  It just prints a message.
  */
-void button_clicked( GtkWidget *widget, gpointer *data ) {
+void button_clicked( GtkWidget *widget, gpointer data ) {
     printf( "button clicked\n" );
 }
 
index 09cb4484eeb01a62682d50490aad0be99f2f8b94..193db0b48affebb21afd0789aac19658c496d293 100644 (file)
@@ -33,7 +33,7 @@ void progress_r (void)
     pstat = FALSE;  
 }
 
-void destroy (GtkWidget *widget, GdkEvent *event, gpointer *data)
+void destroy (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
     gtk_main_quit ();
 }
index a8fa978ae29640e0d44a2fc72243b1a901c10621..8ae7587d4f4767d88233e2e28b87fd60d534c957 100644 (file)
@@ -5,7 +5,8 @@
 #include <gtk/gtk.h>
 #include <glib.h>
 
-void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
+void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) 
+{
   gtk_main_quit();
 }
 
index 4f5e427c51c3c07d7fb23a1a5887466a0b456484..e9aa4a7b5d4e47cec378da221498181d0fff9bcf 100644 (file)
@@ -11,7 +11,8 @@
 
 /* this routine gets control when the close button is clicked
  */
-void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
+void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) 
+{
     gtk_main_quit();
 }
 
index 9ec879e4c4a514610907e57df04c67ce3b3c9ecc..af3666a1aafa1d5ea0038e6d2bbd9b0f084d4dcf 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <gtk/gtk.h>
 
-void destroy(GtkWidget *widget, gpointer *data)
+void destroy(GtkWidget *widget, gpointer data)
 {
     gtk_main_quit();
 }
index f4d96e56959dc620d889e83ea5237e1afd6fc6c9..111592eb145ac21bf935bee62f4e581ae0ec882a 100644 (file)
@@ -7,7 +7,7 @@
 
 GtkWidget *status_bar;
 
-void push_item (GtkWidget *widget, gpointer *data)
+void push_item (GtkWidget *widget, gpointer data)
 {
   static int count = 1;
   char buff[20];
@@ -18,7 +18,7 @@ void push_item (GtkWidget *widget, gpointer *data)
   return;
 }
 
-void pop_item (GtkWidget *widget, gpointer *data)
+void pop_item (GtkWidget *widget, gpointer data)
 {
   gtk_statusbar_pop( GTK_STATUSBAR(status_bar), (guint) &data );
   return;
index f709325f8b8bf78de8fa16d05ab62ed0ff93b682..e3fd182c4df882ddcfb5809703a8d7734d60339b 100644 (file)
@@ -5,13 +5,13 @@
 
 /* our callback.
  * the data passed to this function is printed to stdout */
-void callback (GtkWidget *widget, gpointer *data)
+void callback (GtkWidget *widget, gpointer data)
 {
     g_print ("Hello again - %s was pressed\n", (char *) data);
 }
 
 /* this callback quits the program */
-void delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
+void delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
 {
     gtk_main_quit ();
 }
index fdaa64078f81d7b8a633c30b8b7772bdc6074d8a..22f956cc2dad93de145e33cce6ba3dc636bdf612 100644 (file)
@@ -123,7 +123,7 @@ static char * WheelbarrowFull_xpm[] = {
 
 /* when invoked (via signal delete_event), terminates the application.
  */
-void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
+void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) {
     gtk_main_quit();
 }
 
index 72ff69822b465445df47c88640d49e7e880e7349..3d4d95692474ce0a77882ebb1fe07d96061ecac9 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -490,9 +490,9 @@ GdkFont* gdk_font_load          (const gchar    *font_name);
 GdkFont* gdk_fontset_load   (gchar    *fontset_name);
 GdkFont* gdk_font_ref      (GdkFont  *font);
 void    gdk_font_unref     (GdkFont  *font);
-gint    gdk_font_id        (GdkFont  *font);
-gint    gdk_font_equal     (GdkFont  *fonta,
-                            GdkFont  *fontb);
+gint    gdk_font_id        (const GdkFont  *font);
+gint    gdk_font_equal     (const GdkFont  *fonta,
+                            const GdkFont  *fontb);
 gint    gdk_string_width   (GdkFont  *font,
                             const gchar    *string);
 gint    gdk_text_width     (GdkFont  *font,
index ed9444aed45e3ee7caf6c650e8785d036d8fea16..0465094972408940aca5620a77bfb7511c29e6bf 100644 (file)
 
 
 static guint
-hash_color (gpointer key)
+hash_color (g_const_pointer key)
 {
-  GdkColor *color = key;
+  const GdkColor *color = key;
 
   return (color->red * 33023 + color->green * 30013 + color->blue * 27011);
 }
 
 static gint
-compare_colors (gpointer a,
-               gpointer b)
+compare_colors (g_const_pointer a,
+               g_const_pointer b)
 {
-  GdkColor *aa = a;
-  GdkColor *bb = b;
+  const GdkColor *aa = a;
+  const GdkColor *bb = b;
 
   return ((aa->red == bb->red) && (aa->green == bb->green) && (aa->blue == bb->blue));
 }
index 888afbf69e5cd63503dcfb5c812a1206d2e5287f..352de2003f43c01551c4fbd34fb04baeafcf26a0 100644 (file)
@@ -149,13 +149,13 @@ gdk_font_unref (GdkFont *font)
 }
 
 gint
-gdk_font_id (GdkFont *font)
+gdk_font_id (const GdkFont *font)
 {
-  GdkFontPrivate *font_private;
+  const GdkFontPrivate *font_private;
 
   g_return_val_if_fail (font != NULL, 0);
 
-  font_private = (GdkFontPrivate*) font;
+  font_private = (const GdkFontPrivate*) font;
 
   if (font->type == GDK_FONT_FONT)
     {
@@ -168,17 +168,17 @@ gdk_font_id (GdkFont *font)
 }
 
 gint
-gdk_font_equal (GdkFont *fonta,
-                GdkFont *fontb)
+gdk_font_equal (const GdkFont *fonta,
+                const GdkFont *fontb)
 {
-  GdkFontPrivate *privatea;
-  GdkFontPrivate *privateb;
+  const GdkFontPrivate *privatea;
+  const GdkFontPrivate *privateb;
 
   g_return_val_if_fail (fonta != NULL, FALSE);
   g_return_val_if_fail (fontb != NULL, FALSE);
 
-  privatea = (GdkFontPrivate*) fonta;
-  privateb = (GdkFontPrivate*) fontb;
+  privatea = (const GdkFontPrivate*) fonta;
+  privateb = (const GdkFontPrivate*) fontb;
 
   if (fonta->type == GDK_FONT_FONT && fontb->type == GDK_FONT_FONT)
     {
index ed9444aed45e3ee7caf6c650e8785d036d8fea16..0465094972408940aca5620a77bfb7511c29e6bf 100644 (file)
 
 
 static guint
-hash_color (gpointer key)
+hash_color (g_const_pointer key)
 {
-  GdkColor *color = key;
+  const GdkColor *color = key;
 
   return (color->red * 33023 + color->green * 30013 + color->blue * 27011);
 }
 
 static gint
-compare_colors (gpointer a,
-               gpointer b)
+compare_colors (g_const_pointer a,
+               g_const_pointer b)
 {
-  GdkColor *aa = a;
-  GdkColor *bb = b;
+  const GdkColor *aa = a;
+  const GdkColor *bb = b;
 
   return ((aa->red == bb->red) && (aa->green == bb->green) && (aa->blue == bb->blue));
 }
index 888afbf69e5cd63503dcfb5c812a1206d2e5287f..352de2003f43c01551c4fbd34fb04baeafcf26a0 100644 (file)
@@ -149,13 +149,13 @@ gdk_font_unref (GdkFont *font)
 }
 
 gint
-gdk_font_id (GdkFont *font)
+gdk_font_id (const GdkFont *font)
 {
-  GdkFontPrivate *font_private;
+  const GdkFontPrivate *font_private;
 
   g_return_val_if_fail (font != NULL, 0);
 
-  font_private = (GdkFontPrivate*) font;
+  font_private = (const GdkFontPrivate*) font;
 
   if (font->type == GDK_FONT_FONT)
     {
@@ -168,17 +168,17 @@ gdk_font_id (GdkFont *font)
 }
 
 gint
-gdk_font_equal (GdkFont *fonta,
-                GdkFont *fontb)
+gdk_font_equal (const GdkFont *fonta,
+                const GdkFont *fontb)
 {
-  GdkFontPrivate *privatea;
-  GdkFontPrivate *privateb;
+  const GdkFontPrivate *privatea;
+  const GdkFontPrivate *privateb;
 
   g_return_val_if_fail (fonta != NULL, FALSE);
   g_return_val_if_fail (fontb != NULL, FALSE);
 
-  privatea = (GdkFontPrivate*) fonta;
-  privateb = (GdkFontPrivate*) fontb;
+  privatea = (const GdkFontPrivate*) fonta;
+  privateb = (const GdkFontPrivate*) fontb;
 
   if (fonta->type == GDK_FONT_FONT && fontb->type == GDK_FONT_FONT)
     {
index 1c8b0d827c274c7e54c9e0f9f88c2262379fa394..e9268116300e2d26e8c073ddb29d4c766c28e8b6 100644 (file)
@@ -1,3 +1,21 @@
+Tue Jun  9 17:47:33 1998  Owen Taylor  <otaylor@gtk.org>
+
+       * glib.h: Remove #error - HP/UX.
+
+Sat May 23 19:00:01 1998  Owen Taylor  <otaylor@gtk.org>
+  [ Combination of:
+     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
+     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]
+       
+       * glib.h ghash.c gstring.c gdataset.c gutils.c:
+       - Added new typedef g_const_pointer; expunged all incorrect
+         uses of 'const gpointer'.
+       - Fixed up warnings that that created,
+       - Changed GHashFunc and GCompareFunc to take g_const_pointer
+         arguments. (Necessary, but will cause warnings in existing
+         code until fixed)
+       - Added other new const in harmless positions.
+
 Mon Jun  8 01:06:47 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h: added enum-helper macros for code generation.
index 86a5bfbc7c959f4c090cccc6a7dd040fadc2753f..35ec00779085b056172bd720145a4140718b44d3 100644 (file)
@@ -38,16 +38,17 @@ struct _GDatasetData
   gpointer data;
   GDestroyNotify destroy_func;
 };
+
 struct _GDataset
 {
-  gpointer location;
+  g_const_pointer location;
   GDatasetData *data_list;
 };
 
 
 /* --- prototypes --- */
-static inline GDataset*        g_dataset_lookup        (const gpointer dataset_location);
-static inline void     g_dataset_destroy_i     (GDataset       *dataset);
+static inline GDataset*        g_dataset_lookup        (g_const_pointer dataset_location);
+static inline void     g_dataset_destroy_i     (GDataset        *dataset);
 static void            g_dataset_initialize    (void);
 static guint*          g_dataset_id_new        (void);
 
@@ -64,7 +65,7 @@ static guint g_dataset_id_index = G_DATASET_ID_BLOCK_SIZE + 1;
 
 /* --- functions --- */
 static inline GDataset*
-g_dataset_lookup (const gpointer       dataset_location)
+g_dataset_lookup (g_const_pointer      dataset_location)
 {
   register GDataset *dataset;
   
@@ -108,7 +109,7 @@ g_dataset_destroy_i (GDataset *dataset)
 }
 
 void
-g_dataset_destroy (const gpointer  dataset_location)
+g_dataset_destroy (g_const_pointer  dataset_location)
 {
   register GDataset *dataset;
   
@@ -120,9 +121,9 @@ g_dataset_destroy (const gpointer  dataset_location)
 }
 
 void
-g_dataset_id_set_destroy (const gpointer  dataset_location,
-                         guint           key_id,
-                         GDestroyNotify  destroy_func)
+g_dataset_id_set_destroy (g_const_pointer  dataset_location,
+                         guint            key_id,
+                         GDestroyNotify   destroy_func)
 {
   g_return_if_fail (dataset_location != NULL);
   
@@ -149,8 +150,8 @@ g_dataset_id_set_destroy (const gpointer  dataset_location,
 }
 
 gpointer
-g_dataset_id_get_data (const gpointer  dataset_location,
-                      guint           key_id)
+g_dataset_id_get_data (g_const_pointer  dataset_location,
+                      guint            key_id)
 {
   g_return_val_if_fail (dataset_location != NULL, NULL);
   
@@ -173,10 +174,10 @@ g_dataset_id_get_data (const gpointer  dataset_location,
 }
 
 void
-g_dataset_id_set_data_full (const gpointer  dataset_location,
-                           guint           key_id,
-                           gpointer        data,
-                           GDestroyNotify  destroy_func)
+g_dataset_id_set_data_full (g_const_pointer  dataset_location,
+                           guint            key_id,
+                           gpointer         data,
+                           GDestroyNotify   destroy_func)
 {
   register GDataset *dataset;
   register GDatasetData *list;
@@ -190,7 +191,9 @@ g_dataset_id_set_data_full (const gpointer  dataset_location,
       dataset = g_chunk_new (GDataset, g_dataset_mem_chunk);
       dataset->location = dataset_location;
       dataset->data_list = NULL;
-      g_hash_table_insert (g_dataset_location_ht, dataset->location, dataset);
+      g_hash_table_insert (g_dataset_location_ht, 
+                          (gpointer) dataset->location, /* Yuck */
+                          dataset);
     }
   
   list = dataset->data_list;
index 90ee2afea8bac8d4a6890bf0d7135ee57bd06cb5..48915703610054f71884cf799c8a961f02d0d918 100644 (file)
@@ -145,8 +145,8 @@ g_hash_table_insert (GHashTable *hash_table,
 }
 
 void
-g_hash_table_remove (GHashTable *hash_table,
-                    gpointer    key)
+g_hash_table_remove (GHashTable        *hash_table,
+                    g_const_pointer    key)
 {
   GRealHashTable *rhash_table;
   GHashNode *node;
@@ -187,7 +187,7 @@ g_hash_table_remove (GHashTable *hash_table,
 
 gpointer
 g_hash_table_lookup (GHashTable     *hash_table,
-                    const gpointer  key)
+                    g_const_pointer key)
 {
   GRealHashTable *rhash_table;
   GHashNode *node;
index 693a0cccf7493b4a7b5e2481f7a3935756ae14f1..c1c3c5ee5dc671894e31ac68fadf13cfe23da978 100644 (file)
@@ -389,6 +389,7 @@ typedef double gldouble;
 #endif /* 0 */
 
 typedef void* gpointer;
+typedef const void *g_const_pointer;
 
 #if (SIZEOF_CHAR == 1)
 typedef signed char    gint8;
@@ -429,7 +430,7 @@ typedef unsigned long       guint32;
 #define GUINT_TO_POINTER(u) ((gpointer)(gulong)(u))
 
 #else
-#error "No integer type of the same size as a pointer"
+/* This should never happen */
 #endif
 
 
@@ -455,9 +456,6 @@ typedef void                (*GFunc)                (gpointer  data,
 typedef void           (*GHFunc)               (gpointer  key,
                                                 gpointer  value,
                                                 gpointer  user_data);
-typedef guint          (*GHashFunc)            (gpointer  key);
-typedef gint           (*GCompareFunc)         (gpointer  a,
-                                                gpointer  b);
 typedef gpointer       (*GCacheNewFunc)        (gpointer  key);
 typedef gpointer       (*GCacheDupFunc)        (gpointer  value);
 typedef void           (*GCacheDestroyFunc)    (gpointer  value);
@@ -474,6 +472,9 @@ typedef void                (*GScannerMsgFunc)      (GScanner *scanner,
                                                 gint      error);
 typedef void           (*GDestroyNotify)       (gpointer  data);
 
+typedef guint          (*GHashFunc)            (g_const_pointer  key);
+typedef gint           (*GCompareFunc)         (g_const_pointer  a,
+                                                g_const_pointer  b);
 
 struct _GList
 {
@@ -623,12 +624,12 @@ GHashTable* g_hash_table_new       (GHashFunc       hash_func,
                                  GCompareFunc    key_compare_func);
 void       g_hash_table_destroy (GHashTable     *hash_table);
 void       g_hash_table_insert  (GHashTable     *hash_table,
-                                 gpointer        key,
-                                 gpointer        value);
+                                 gpointer        key,
+                                 gpointer        value);
 void       g_hash_table_remove  (GHashTable     *hash_table,
-                                 gpointer        key);
+                                 g_const_pointer key);
 gpointer    g_hash_table_lookup         (GHashTable     *hash_table,
-                                 const gpointer  key);
+                                 g_const_pointer  key);
 void       g_hash_table_freeze  (GHashTable     *hash_table);
 void       g_hash_table_thaw    (GHashTable     *hash_table);
 void       g_hash_table_foreach (GHashTable     *hash_table,
@@ -892,29 +893,29 @@ GArray* g_rarray_truncate (GArray   *array,
 
 /* Hash Functions
  */
-gint  g_str_equal (const gpointer v,
-                  const gpointer v2);
-guint g_str_hash  (const gpointer v);
+gint  g_str_equal (g_const_pointer v,
+                  g_const_pointer v2);
+guint g_str_hash  (g_const_pointer v);
 
 /* This "hash" function will just return the key's adress as an
  * unsigned integer. Useful for hashing on plain adresses or
  * simple integer values.
  */
-guint g_direct_hash (gpointer key);
+guint g_direct_hash (g_const_pointer key);
 
 
 /* Location Associated Data
  */
-void     g_dataset_destroy             (const gpointer  dataset_location);
+void     g_dataset_destroy             (g_const_pointer dataset_location);
 guint    g_dataset_try_key             (const gchar    *key);
 guint    g_dataset_force_id            (const gchar    *key);
-gpointer  g_dataset_id_get_data                (const gpointer  dataset_location,
+gpointer  g_dataset_id_get_data                (g_const_pointer dataset_location,
                                         guint           key_id);
-void     g_dataset_id_set_data_full    (const gpointer  dataset_location,
+void     g_dataset_id_set_data_full    (g_const_pointer dataset_location,
                                         guint           key_id,
                                         gpointer        data,
                                         GDestroyNotify  destroy_func);
-void     g_dataset_id_set_destroy      (const gpointer  dataset_location,
+void     g_dataset_id_set_destroy      (g_const_pointer dataset_location,
                                         guint           key_id,
                                         GDestroyNotify  destroy_func);
 
index 56f621ea356b2dda7ef5612e2d835f2f31705531..ccb696053d36a3fc45aacecfab43aecd6c8f62be 100644 (file)
@@ -401,7 +401,7 @@ g_scanner_foreach_internal (gpointer  key,
   register gpointer *d;
 
   d = user_data;
-  func = d[0];
+  func = (GHFunc)d[0];
   func_data = d[1];
   hash_val = value;
 
@@ -417,7 +417,7 @@ g_scanner_foreach_symbol (GScanner       *scanner,
 
   g_return_if_fail (scanner != NULL);
 
-  d[0] = func;
+  d[0] = (gpointer)func;
   d[1] = func_data;
 
   g_hash_table_foreach (scanner->symbol_table, g_scanner_foreach_internal, d);
index df3fdb500939259a5274dcdbf9d353cfa93223ff..a4c20449c96baccec3485982705a7ab8c45aa660 100644 (file)
@@ -50,17 +50,17 @@ static GMemChunk *string_mem_chunk = NULL;
  */
 
 gint
-g_str_equal (const gpointer v, const gpointer v2)
+g_str_equal (g_const_pointer v, g_const_pointer v2)
 {
-  return strcmp ((gchar*) v, (gchar*)v2) == 0;
+  return strcmp ((const gchar*) v, (const gchar*)v2) == 0;
 }
 
 /* a char* hash function from ASU */
 guint
-g_str_hash (const gpointer v)
+g_str_hash (g_const_pointer v)
 {
-  char *s = (char*)v;
-  char *p;
+  const char *s = (char*)v;
+  const char *p;
   guint h=0, g;
 
   for(p = s; *p != '\0'; p += 1) {
index 321501827abbc6ffc9013757d52d76f8b059f716..ef1b4090d8ad0f61aa5e3cbcebaaeaf09ce6bb9f 100644 (file)
@@ -847,7 +847,7 @@ g_parse_debug_string  (const gchar *string,
 }
 
 guint
-g_direct_hash(gpointer key)
+g_direct_hash(g_const_pointer key)
 {
   return GPOINTER_TO_UINT (key);
 }
index 4c223667ac1f5b50322a666ea2df5cfc1bbb4738..8c638eefaa13b24c839ff1fa873a309522197036 100644 (file)
@@ -33,31 +33,31 @@ my_hash_callback (gpointer key,
 }
 
 guint
-my_hash (gpointer key)
+my_hash (g_const_pointer key)
 {
-  return (guint) *((gint*) key);
+  return (guint) *((const gint*) key);
 }
 
 gint
-my_hash_compare (gpointer a,
-                gpointer b)
+my_hash_compare (g_const_pointer a,
+                g_const_pointer b)
 {
-  return *((gint*) a) == *((gint*) b);
+  return *((const gint*) a) == *((const gint*) b);
 }
 
 gint 
-my_list_compare_one (gpointer a, gpointer b)
+my_list_compare_one (g_const_pointer a, g_const_pointer b)
 {
-  gint one = *((gint*)a);
-  gint two = *((gint*)b);
+  gint one = *((const gint*)a);
+  gint two = *((const gint*)b);
   return one-two;
 }
 
 gint 
-my_list_compare_two (gpointer a, gpointer b)
+my_list_compare_two (g_const_pointer a, g_const_pointer b)
 {
-  gint one = *((gint*)a);
-  gint two = *((gint*)b);
+  gint one = *((const gint*)a);
+  gint two = *((const gint*)b);
   return two-one;
 }
 
@@ -69,11 +69,11 @@ my_list_print (gpointer a, gpointer b)
 }; */
 
 gint
-my_compare (gpointer a,
-           gpointer b)
+my_compare (g_const_pointer a,
+           g_const_pointer b)
 {
-  char *cha = a;
-  char *chb = b;
+  const char *cha = a;
+  const char *chb = b;
 
   return *cha - *chb;
 }
index b834199afe3fc274c289557699530623b1fe80e4..36168883ea1ec118b5f1bcf1a79e7c92a9c95967 100644 (file)
@@ -57,11 +57,11 @@ static GMemChunk    *accel_entries_mem_chunk = NULL;
 
 /* --- functions --- */
 static gint
-gtk_accel_entries_equal (gpointer a,
-                        gpointer b)
+gtk_accel_entries_equal (g_const_pointer a,
+                        g_const_pointer b)
 {
-  GtkAccelEntry *e1;
-  GtkAccelEntry *e2;
+  const GtkAccelEntry *e1;
+  const GtkAccelEntry *e2;
   
   e1 = a;
   e2 = b;
@@ -72,9 +72,9 @@ gtk_accel_entries_equal (gpointer a,
 }
 
 static guint
-gtk_accel_entries_hash (gpointer a)
+gtk_accel_entries_hash (g_const_pointer a)
 {
-  GtkAccelEntry *e;
+  const GtkAccelEntry *e;
   guint h;
   
   e = a;
index 8c8b3521c2a013f4c296b95ea611a3db59500f78..3c7914ab8197fc64565bacd8a694d9ef346e8439 100644 (file)
@@ -118,11 +118,12 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com
   GList *li;
 
   /* completion */
-  if ( event->keyval == GDK_Tab ) {
+  if (event->keyval == GDK_Tab) 
+    {
     GCompletion * cmpl;
     gchar* prefix;
     gchar* nprefix = NULL;
-    guint pos;
+    gint pos;
     
     gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
     cmpl = g_completion_new((GCompletionFunc)gtk_combo_func);
@@ -130,9 +131,10 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com
     pos = GTK_EDITABLE(entry)->current_pos;
     prefix = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, pos);
     g_completion_complete(cmpl, prefix, &nprefix);
-    if ( nprefix && strlen(nprefix) > strlen(prefix) ) {
+    if (nprefix && strlen(nprefix) > strlen(prefix)) 
+      {
        gtk_editable_insert_text(GTK_EDITABLE(entry), nprefix+pos, 
-               strlen(nprefix)-strlen(prefix), &pos);
+                                strlen(nprefix)-strlen(prefix), &pos);
        GTK_EDITABLE(entry)->current_pos = pos;
     }
     g_free(prefix);
index fc38a776ad5b56e1517566b35f4a3e53f44482b7..02fb22ceb23e004c38e9115a6821f0ffe43cb08f 100644 (file)
@@ -128,11 +128,11 @@ static gint  gtk_timeout_remove_from_list (GList               **list,
                                           guint                 tag, 
                                           gint                  remove_link);
 
-static gint  gtk_idle_compare           (gpointer            a, 
-                                         gpointer            b);
+static gint  gtk_idle_compare           (g_const_pointer      a, 
+                                         g_const_pointer      b);
 
-static gint  gtk_timeout_compare        (gpointer            a, 
-                                         gpointer            b);
+static gint  gtk_timeout_compare        (g_const_pointer      a, 
+                                         g_const_pointer      b);
 
 const guint gtk_major_version = GTK_MAJOR_VERSION;
 const guint gtk_minor_version = GTK_MINOR_VERSION;
@@ -997,9 +997,10 @@ gtk_timeout_remove (guint tag)
  * sure that we insert at the _end_ of the idles of this priority
  */
 static gint
-gtk_idle_compare (gpointer a, gpointer b)
+gtk_idle_compare (g_const_pointer a, g_const_pointer b)
 {
-  return (((GtkIdleFunction *)a)->priority < ((GtkIdleFunction *)b)->priority)
+  return (((const GtkIdleFunction *)a)->priority <
+         ((const GtkIdleFunction *)b)->priority)
     ? -1 : 1;
 }
 
@@ -1365,10 +1366,10 @@ gtk_exit_func (void)
  * sure that we insert after timeouts of equal interval
  */
 static gint
-gtk_timeout_compare (gpointer a, gpointer b)
+gtk_timeout_compare (g_const_pointer a, g_const_pointer b)
 {
-  return (((GtkTimeoutFunction *)a)->interval < 
-         ((GtkTimeoutFunction *)b)->interval)
+  return (((const GtkTimeoutFunction *)a)->interval < 
+         ((const GtkTimeoutFunction *)b)->interval)
     ? -1 : 1;
 }
 
index 4c5c6a98fae5398b310421a43c860e72f38038bb..2d8c145c38cfe9265dcc15ed31e946edcd9c2a3a 100644 (file)
@@ -120,15 +120,6 @@ gtk_object_debug (void)
 
   g_print ("GTK-DEBUG: living objects count = %d\n", obj_count);
 }
-static guint
-gtk_object_pointer_hash (const gpointer v)
-{
-  gint i;
-
-  i = (gint) v;
-  
-  return i;
-}
 #endif /* G_ENABLE_DEBUG */
 
 /****************************************************
@@ -215,7 +206,7 @@ gtk_object_init (GtkObject *object)
       obj_count++;
       
       if (!living_objs_ht)
-       living_objs_ht = g_hash_table_new (gtk_object_pointer_hash, NULL);
+       living_objs_ht = g_hash_table_new (g_direct_hash, NULL);
 
       g_hash_table_insert (living_objs_ht, object, object);
     }
index 93251371c19cd45e3965aed7ad7a330ed6c65e94..0e08565bb455f60b1c3129a2e8b14181583bb3c3 100644 (file)
@@ -119,9 +119,9 @@ struct _GtkDisconnectInfo
 };
 
 
-static guint       gtk_signal_hash            (const gpointer h);
-static gint        gtk_signal_compare         (const gpointer h1,
-                                               const gpointer h2);
+static guint       gtk_signal_hash            (g_const_pointer h);
+static gint        gtk_signal_compare         (g_const_pointer h1,
+                                               g_const_pointer h2);
 static GtkHandler*  gtk_signal_handler_new     (void);
 static void        gtk_signal_handler_ref     (GtkHandler    *handler);
 static void        gtk_signal_handler_unref   (GtkHandler    *handler,
@@ -1186,19 +1186,19 @@ gtk_signal_set_funcs (GtkSignalMarshal marshal_func,
 }
 
 static guint
-gtk_signal_hash (const gpointer h)
+gtk_signal_hash (g_const_pointer h)
 {
-  register GtkSignalHash *hash = h;
+  register const GtkSignalHash *hash = h;
   
   return hash->object_type ^ hash->name_key_id;
 }
 
 static gint
-gtk_signal_compare (const gpointer h1,
-                   const gpointer h2)
+gtk_signal_compare (g_const_pointer h1,
+                   g_const_pointer h2)
 {
-  register GtkSignalHash *hash1 = h1;
-  register GtkSignalHash *hash2 = h2;
+  register const GtkSignalHash *hash1 = h1;
+  register const GtkSignalHash *hash2 = h2;
   
   return (hash1->name_key_id == hash2->name_key_id &&
          hash1->object_type == hash2->object_type);
index 448f913aa788af860119176c0b14a631ad2dbd17..1acca9b5bcfd193f20e5abcc32d46e3e5515cb36 100644 (file)
@@ -2495,9 +2495,9 @@ insert_expose (GtkText* text, guint old_pixels, gint nchars,
 }
 
 static guint
-font_hash (gpointer font)
+font_hash (g_const_pointer font)
 {
-  return gdk_font_id ((GdkFont*) font);
+  return gdk_font_id ((const GdkFont*) font);
 }
 
 static TextFont*